#!/bin/sh

Tumor=$1
Normal=$2
config_path=$3

source ${config_path}/config.sh

${tools_path}/gatk-tools/gatk-tools-1.0-SNAPSHOT/bin/run-gatk \
--analysis_type CalculateSNVMetrics \
--reference_sequence ${ref_fasta} \
--countOverlappingReadPairs DISCARD_IF_DISCORDANT_OR_USE_HIGHEST_BASE_QUALITY \
--intervals ${vcf_path}/${Tumor}_${Normal}_PASS.vcf \
--variant ${vcf_path}/${Tumor}_${Normal}_PASS.vcf \
--input_file ${vcf_path}/${Tumor}_${Normal}.mutect2.bamout.bam \
--input_file ${bam_path}/${Normal}-recal.bam \
--sample ${Tumor} \
--controlSample ${Normal} \
--minimumMappingQuality 1 \
--minimumBaseQuality 10 \
--out ${vcf_qc_path}/${Tumor}_${Normal}.metrics.vcf \
2> ${log_path}/${Tumor}_${Normal}.CalculateSNVMetrics.log

